import 'package:flutter/material.dart';
import 'package:test1/View/MyRowText.dart';
import 'package:test1/pages/animation/Flutter_AnimatedBuilder_Page.dart';
import 'package:test1/pages/animation/Flutter_AnimatedOpacity_Page.dart';
import 'package:test1/pages/animation/Flutter_AnimatedWidget_Page.dart';
import 'package:test1/pages/animation/Flutter_Animation_Page.dart';
import 'package:test1/pages/animation/Flutter_ParallelAnimation_Page.dart';

class Flutter_Animations_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("动画"),
        ),
        body: ListView(
          children: <Widget>[
            MyRowText("Animation<T>和AnimationController", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Flutter_Animation_Page();
                }))
            ),
            MyRowText("AnimatedWidget替代addListener()和setState()", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Flutter_AnimatedWidget_Page();
                }))
            ),
            MyRowText("AnimatedBuilder能刚好的职责分离", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Flutter_AnimatedBuilder_Page();
                }))
            ),
            MyRowText("并行动画", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Flutter_ParallelAnimation_Page();
                }))
            ),
            MyRowText("AnimatedOpacity实现渐变", () =>
                Navigator.push(
                    context, MaterialPageRoute(builder: (BuildContext context) {
                  return Flutter_AnimatedOpacity_Page();
                }))
            ),

          ],
        ),
      ),
    );
  }
}